package com.zhijian.medical.dao.local;

import com.zhijian.medical.entity.po.AgentiaCheckHistory;
import com.zhijian.medical.entity.vo.request.AgentiaCheckHistorySearchVo;
import com.zhijian.medical.entity.vo.response.AgentiaCheckHistoryVo;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AgentiaCheckHistoryMapper {
    int deleteByPrimaryKey(Long id);

    int insert(AgentiaCheckHistory record);

    int insertSelective(AgentiaCheckHistory record);

    AgentiaCheckHistory selectByPrimaryKey(Long id);

    /**
     * 根据试剂ID查询
     *
     * @param agentiaId
     * @return
     */
    AgentiaCheckHistory selectByAgentiaId(Long agentiaId);

    int updateByPrimaryKeySelective(AgentiaCheckHistory record);

    int updateByPrimaryKey(AgentiaCheckHistory record);

    int count(AgentiaCheckHistorySearchVo agentiaCheckHistorySearchVo);

    List<AgentiaCheckHistoryVo> selectList(AgentiaCheckHistorySearchVo agentiaCheckHistorySearchVo);

    AgentiaCheckHistoryVo selectVoById(Long id);

    int insertBatch(@Param("entities") List<AgentiaCheckHistory> entities);

    /**
     * 查询出某天最新数据的code
     *
     * @param day
     * @return
     */
    String selectMaxCodeByDay(String day);
}